﻿#region Copyright 
/*-------------------------------------------------------------------------
* 命名空间名称/文件名:    SSPivot.Data.Entity/ICreatedAuditedEntity 
* CLR版本:     4.0.30319.42000
* 机器名称:    DESKTOP-NHMLO8A
* 功 能：       N/A
* 类 名：       ICreatedAuditedEntity
* 创建时间：  2025/5/22 11:45:04
* 版本号：      v1.0
* 创建人:        xulong
*-------------------------------------------------------------------------*/
#endregion
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SSPivot.Data.Entities
{
    public interface IAuditedCreatedEntity:IEntity
    {
        DateTime CreatedTime { get; set; }
        string? Creator { get; set; }
        long? CreatorId { get; set; }
    }
    [Serializable]
    public abstract class AuditedCreateEntity : Entity, IAuditedCreatedEntity
    {
        public virtual DateTime CreatedTime { get; set; }
        /// <inheritdoc />
        public virtual long? CreatorId { get; set; }
        [MaxLength(50)]
        public virtual string? Creator { get; set; }
    }


    [Serializable]
    public abstract class AuditedCreateEntity<TKey> : Entity<TKey>, IAuditedCreatedEntity
    {
        /// <inheritdoc />
        public virtual DateTime CreatedTime { get; set; }
        public virtual long? CreatorId { get; set; }
        [MaxLength(50)]
        public virtual string? Creator { get; set; }
    }
}
